-- GENERATED SPELL FOR [Hatecrest Warrior] --


function spell0_5331(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_5331', 560, 1)
end

function spell1_5331(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5331', 5347, 1)
end

function Sorts_5331(pUnit, Event)
local choix_sorts_5331 = math.random(0, 1)
if choix_sorts_5331 == 0 then
pUnit:RegisterEvent('spell0_5331', 1, 1)
end
if choix_sorts_5331 == 1 then
pUnit:RegisterEvent('spell1_5331', 1, 1)
end
end

function mob5331_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5331', math.random(1500, 3000), 1)
end

function mob5331_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5331_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5331_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5331, 1, 'mob5331_Action')
RegisterUnitEvent(5331, 2, 'mob5331_Leave')
RegisterUnitEvent(5331, 3, 'mob5331_Kill')
RegisterUnitEvent(5331, 4, 'mob5331_Die')
